package br.com.fox.iebav.dao;

import java.util.ArrayList;
import java.util.List;

import javax.ejb.Stateless;
import javax.persistence.Query;

import br.com.fox.iebav.dao.abstractdao.AbstractDAO;
import br.com.fox.iebav.entity.Subfamilias;



@Stateless
public class SubFamiliaDAO extends AbstractDAO  {

	private Query q = null;

	public List<Subfamilias> findAll()
	{
		q = entityManager.createQuery("FROM Subfamilias");
		@SuppressWarnings("unchecked")
		List<Subfamilias> list = q.getResultList();
		if(list.isEmpty())
			return new ArrayList<Subfamilias>();
		return list;
	}
}
